package com.xihuanjun.sdk.entity;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xihuanjun.sdk.enums.ProductionOrderStatusEnum;
import com.xihuanjun.sdk.enums.ProductionOrderTypeEnum;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Copyright (C), 2024-09-05
 * FileName: SapProductionOrder
 * Author:   溪浣君
 * Date:     2024-09-05 11:14
 * Description: 生产工单
 */
@Data
@NoArgsConstructor
@ToString
@JsonAutoDetect(fieldVisibility= JsonAutoDetect.Visibility.ANY,getterVisibility= JsonAutoDetect.Visibility.NONE)
public class SapProductionOrder<T extends SapProductionOrderLine> extends  BaseEntity {


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ProductionOrderStatusEnum ProductionOrderStatus;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ProductionOrderTypeEnum ProductionOrderType;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String ItemNo;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String Warehouse;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String ProductDescription;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal PlannedQuantity;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal CompletedQuantity;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal RejectedQuantity;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date StartDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date PostingDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date DueDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date CreationDate;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String Remarks;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<T> ProductionOrderLines;
}
